import utils from "@/libs/utils"
export default {
    mounted(el,binding) {
        const onSwitchSortId = binding.value;
        let oSwitch = el,
            oTarget = el.querySelectorAll('a')[0];
        utils.addEvent(oSwitch, 'click', function (e) {
            oTarget.className = "";
            oTarget = e.target;
            oTarget.className = "part_switch_on";

            let sort = oTarget.getAttribute('data-sort')
            onSwitchSortId(sort);
        })
    }
}